package com.csd.action.team;

import com.csd.helper.ActionResult;
import com.csd.pojo.CostRecord;
import com.csd.serviceImpl.CostRecordService;

/**
 * 
 * Action：提交一个花费
 * @author csd
 * @version 1.0
 * 
 * <br> 修订时间：2009-12-17
 * <br> 修改原因：创建文件
 * <br> 修改人：刘世彬
 * 
 * <br> 
 * 
 */
public class CostRecordAction {
	/** 工程ID */
	private String projectID;
	/** 费用纪录 */
	private CostRecord record;

	private CostRecordService service;

	public CostRecordService getService() {
		return service;
	}

	public void setService(CostRecordService service) {
		this.service = service;
	}

	public String getProjectID() {
		return projectID;
	}

	public void setProjectID(String projectID) {
		this.projectID = projectID;
	}

	public CostRecord getRecord() {
		return record;
	}

	public void setRecord(CostRecord record) {
		this.record = record;
	}

	public String execute() {
		String result = ActionResult.fail;
		
		if(service.saveCostRecord(this.record))
			result=ActionResult.success;
		
		return result;
	}
}
